#include<iostream>

namespace  sptr
{
	template<class T>
	class unique_ptr
	{
	public:
		unique_ptr(T* ptr=nullptr)
			:_ptr(ptr)
		{}
		~unique_ptr()
		{
			if (_ptr)
			{
				delete _ptr;
				_ptr = nullptr;
			}
		}
		T& operator*()
		{
			return *this;
		}
		T* operator->()
		{
			return _ptr;
		}
		unique_ptr(unique_ptr<T>& uptr) = delete;
		unique_ptr& operator=(unique_ptr<T>& uptr) = delete;
	private:
		T* _ptr;
	};
}
